import java.util.Arrays;
import java.util.Scanner;

/**
 * DomWon
 * Created with Intellij IDEA.
 * Description:
 * User:WEI
 * Date:2023/3/9
 * Time:15:20
 */
public class TestDemo {
    public static void main(String[] args) {
        int[][] array = {{11,33,55},{22,44,66,88},{131,214,315,146},{928,827,726,625},{424,525}};
        int sum = add(array);
        System.out.println(sum);
    }

    public static int add (int[][] array) {
        int sum = 0;
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                sum += array[i][j];
            }
        }
        return sum;
    }

    public static void main4(String[] args) {
        Scanner scan = new Scanner(System.in);
        int [] array = new int [6];
        for (int i = 0; i < array.length; i++) {
            array[i] = scan.nextInt();
        }
        System.out.println(Arrays.toString(array));
        int right = array.length-1;
        int left = 0;
        for (int i = 0; i < (array.length/2); i++) {
            int tmp = array[right-i];
            array[right-i] = array[left+i];
            array[left+i] = tmp;
        }
        System.out.println(Arrays.toString(array));
    }

    public static void main3(String[] args) {
        int[] array = {};
        String ret = myTostring(array);
        System.out.println(ret);
    }

    public static String myTostring(int[] array) {
        String ret = "[";
        if(array.length == 0) {
            return "[]";
        }
        for (int i = 0; i < array.length; i++) {
            if(i != array.length-1) {
                ret = ret + array[i] + ",";
            }
        }
        ret = ret + array[array.length-1] + "]";
        return ret;
    }

    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        int [] array = new int [6];
        for (int i = 0; i < array.length; i++) {
            array[i] = scan.nextInt();
        }
        int max = array[0];
        int min = array[0];
        for (int i = 0; i < array.length; i++) {
            if(array [i] > max) {
                max = array [i];
            }
            if(array [i] < min) {
                min = array [i];
            }
        }
        System.out.println(max+" "+min);
    }
}
